Cause the build to fail if liblockfile isn't selected for movemail.
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Apr 2011 03:46:26 +0000 (22:46 -0500)
committerRob Browning <rlb@defaultvalue.org>
Thu, 7 Apr 2011 05:49:44 +0000 (00:49 -0500)
The build will fail if liblockfile isn't selected for movemail.

This makes sure the Debian Emacs won't accidentally be built with the
wrong locking strategy.  To disable this check, comment out
require-movemail-use-liblockfile.diff in debian/patches/series.

Author: Rob Browning <rlb@defaultvalue.org>
Added-by: Rob Browning <rlb@defaultvalue.org>
lib-src/movemail.c
src/s/bsd-common.h

index 5fcc6de17a63b750fda4407f09d59c325c77c5bf..58add49e2dcdc8c486178ee89a1edd4428288d5f 100644 (file)
@@ -166,6 +166,10 @@ int mbx_delimit_end ();
 /* Nonzero means this is name of a lock file to delete on fatal error.  */
 char *delete_lockname;
 
+#ifndef MAIL_USE_MAILLOCK
+#error "Debian requires that mail locking be handled by liblockfile."
+#endif /* ndef MAIL_USE_MAILLOCK */
+
 int
 main (argc, argv)
      int argc;
index 78892555402aeae0c087fa91de63b65d9e9b534c..56fcb4aeb8ed5eb683610e71445422a23169435d 100644 (file)
@@ -66,7 +66,11 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
    The alternative is that a lock file named
    /usr/spool/mail/$USER.lock.  */
 
+/* conditional copied from gnu-linux.h */
+#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \
+      defined (HAVE_MAILLOCK_H))
 #define MAIL_USE_FLOCK
+#endif
 
 /* Define CLASH_DETECTION if you want lock files to be written
    so that Emacs can tell instantly when you try to modify